/*
Author: hawksoft
Date: Nov.26th 2023
*/

#include <vector>
template <class T>
class Vector
{
    public:
        vector<T> contents;
        int get_size()
        {
            return contents.size();
        }
        int  add(T  a)  //返回值是当前插入元素的下标值
        {
            contents.push_back(a);
            return contents.size()-1;
        }
        void remove(int i)
        {
            contents.erase(contents.begin()+i);
        }
        T operator[] (int i)
        {
            return contents[i];
        }
    
};

/*
#include <iostream>
using namespace std;
int main()
{
    Vector<int> vint;
    int n,m;
    //cin >> n >> m;
    n =100;
    m = 50;
    for ( int i=0; i<n; i++ ) {
        //    add() can inflate the vector automatically
        vint.add(i);    
    }
    //    get_size() returns the number of elements stored in the vector
    cout << vint.get_size() << endl;
    cout << vint[m] << endl;
    //    remove() removes the element at the index which begins from zero
    vint.remove(m);
    cout << vint.add(-1) << endl;
    cout << vint[m] << endl;
    Vector<int> vv = vint;
    cout << vv[vv.get_size()-1] << endl;
    vv.add(m);
    cout << vint.get_size() << endl;
}
*/